# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
# Contributor: Giovanni Scafora <giovanni@archlinux.org>
# Contributor: Gilles CHAUVIN <gcnweb@gmail.com>

pkgname=live-media
pkgver=2023.01.19
pkgrel=1
pkgdesc='Set of C++ libraries for multimedia streaming'
url='http://live555.com/liveMedia'
arch=('x86_64')
license=('LGPL')
depends=('gcc-libs' 'openssl')
source=(https://download.videolan.org/contrib/live555/live.${pkgver}.tar.gz)
sha256sums=('a7c64913f7f7007c5fdc29ea811e3ca781f262271b3e42afdd4bc1041d86fa99')
sha512sums=('155c38097d37864978d6b68bf0a7268a9cc88160ebbe679ca5654bd925c5400ef5f74aa6307f53c9584a4611d914d0c8edd275b66b7ca9a66be6591a5b5a8f4f')

prepare() {
  cd live
  find . -name Makefile.head | xargs sed -e 's|/local||g' -i # Fix prefix
}

build() {
  cd live
  sed -E 's|(-DSOCKLEN_T=socklen_t)|\1 -fPIC -DRTSPCLIENT_SYNCHRONOUS_INTERFACE=1|g' -i config.linux-with-shared-libraries
  ./genMakefiles linux-with-shared-libraries
  make
}

package() {
  cd live
  make DESTDIR="$pkgdir" install
}

# vim: ts=2 sw=2 et:
